package com.caijg.service.impl;

import com.caijg.domain.po.Prompt;
import com.caijg.mapper.PromptMapper;
import com.caijg.service.IPromptService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author caijg
 * @since 2025-04-16
 */
@Service
public class PromptServiceImpl extends ServiceImpl<PromptMapper, Prompt> implements IPromptService {

    @Override
    public String getPromptByName(String name) {
        // 根据名称查询提示词内容
        Prompt prompt = this.lambdaQuery().eq(Prompt::getName, name).one();
        return prompt.getContent();
    }
}
